<template>
  <el-main id="community_el_main">
    <router-view></router-view>
    <el-tooltip effect="dark" content="回到顶部" placement="top">
      <div @click="backTop()" class="el-backtop" style="right: 80px; bottom: 120px;">
        <i class="el-icon-caret-top"></i>
      </div>
    </el-tooltip>
    <el-tooltip effect="dark" content="底部" placement="top">
      <div @click="backBottom()" class="el-backtop" style="right: 80px; bottom: 70px;">
        <i class="el-icon-caret-bottom"></i>
      </div>
    </el-tooltip>
  </el-main>
</template>
<script>
export default {
  data() {
    return {}
  },
  methods: {
    backTop() {
      document.getElementById('community_el_main').scrollTop = 0
    },
    backBottom() {
      document.getElementById('community_el_main').scrollTop = document.getElementById('community_el_main').scrollHeight
    }
  }
}

</script>
<style scoped>
</style>
